<% if card.image.present? %>
  <div class="card__background">
    <%= image_tag card.image.presence || "", size: 120, data: { upload_preview_target: "image" } %>
  </div>

  <%= yield %>
<% end %>

<% if card.postponed? %>
  <div class="card__closed <%= "card__closed--system" if card.postponed_by&.system? %>">
    <span class="card__closed-title" data-text="Not Now">Not Now</span>
    <strong class="card__closed-date"><%= card.postponed_at.strftime("%b %d, %Y") %></strong>
    <span class="card__closed-by-line">by <span class="card__closed-by"><%= card.postponed_by&.familiar_name %></span></span>
  </div>
<% end %>

<% if card.closed? %>
  <div class="card__closed">
    <span class="card__closed-title" data-text="Done">Done</span>
    <strong class="card__closed-date"><%= card.closed_at.strftime("%b %d, %Y") %></strong>
    <span class="card__closed-by-line">by <span class="card__closed-by"><%= card.closed_by.familiar_name %></span></span>
  </div>
<% end %>
